﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _14.Observer
{
    class Program
    {
        static void Main(string[] args)
        {
            Boss huhansan = new Boss();

            StockObserver tongzhi1 = new StockObserver("魏关姹", huhansan);
            NBAObserver tongzhi2 = new NBAObserver("易管查", huhansan);

            huhansan.Update += new EventHandlerC(tongzhi1.CloseStockMarket);
            huhansan.Update += new EventHandlerC(tongzhi2.CloseNBADirectSeeding);

            huhansan.SubjectState = "我胡汉三回来了！";

            huhansan.Notify();

            Console.ReadLine();
        }
    }
}
